﻿#pragma strict

function Start () {

}

function Update () {

}

function OnGUI() {
	var buttonSize : GUILayoutOption[] = [GUILayout.Width(120)];
	GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height));
	GUILayout.FlexibleSpace();
	
	GUILayout.BeginHorizontal();
	GUILayout.FlexibleSpace();
	var startButton = GUILayout.Button("Start Game", buttonSize);
	GUILayout.FlexibleSpace();
	GUILayout.EndHorizontal();
	
	GUILayout.BeginHorizontal();
	GUILayout.FlexibleSpace();
	var loadButton = GUILayout.Button("Load Game", buttonSize );
	GUILayout.FlexibleSpace();
	GUILayout.EndHorizontal();
	
	GUILayout.BeginHorizontal();
	GUILayout.FlexibleSpace();
	var optionButton = GUILayout.Button("Options", buttonSize);
	GUILayout.FlexibleSpace();
	GUILayout.EndHorizontal();
	
	GUILayout.BeginHorizontal();
	GUILayout.FlexibleSpace();
	var exitButton = GUILayout.Button("Exit", buttonSize );
	GUILayout.FlexibleSpace();
	GUILayout.EndHorizontal();
	
	GUILayout.FlexibleSpace();
	GUILayout.EndArea();
	if (startButton) {
		BeginGame();
	} else if (loadButton) {
		LoadMenu();
	} else if (optionButton) {
		OptionMenu();
	} else if (exitButton) {
		Exit();
	}
}

function BeginGame() {
Application.LoadLevel("gamescreen");
}

function LoadMenu() {
}

function OptionMenu() {
}

function Exit() {
	Application.Quit();
}